<!DOCTYPE html>
<html xmlns:th="https//www.thymeleaf.org">
<head>
		<title>添加/编辑用户</title>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet" type="text/css"/>
		<script th:src="@{/js/jquery-3.4.1.min.js}" type="text/javascript"></script>
		<script th:src="@{/js/bootstrap.min.js}" type="text/javascript"></script>
</head>
<body>
	<div class="container">
		<form class="form-row" th:action="@{/saveuser}" th:object="${user}" method="POST">
			<div class="col col-12">
			<div class="row form-group">
				<label for="account">账号</label>
				<input type="hidden" th:field="*{uid}">
				<input th:if="*{uid!=null&&uid>0}" type="hidden" th:field="*{password}">
				<input class="form-control" maxlength="20" th:field="*{account}" required placeholder="请输入账号">
			</div>
			<div class="row form-group"  th:unless="*{uid!=null&&uid>0}">
			<!--  -->
				<label for="password">密码</label>
				<input type="password" maxlength="20" class="form-control" th:field="*{password}" required placeholder="请输入密码">
			</div>
			<div class="row form-group">
				<label for="name">姓名</label>
				<input type="text" class="form-control" th:field="*{name}">
			</div>
			<div class="row form-group">
			<label for="grander">性别</label>
			<select  th:field="*{grander}" class="custom-select d-block w-100" required>
              <option th:each="a:${sexes}" th:text="${a}" th:value="${a}"  > </option>
            </select>
			</div>
			<div class="row form-group">
				<label for="birthday">出生日期</label>
				<input type="date" th:field="*{birthday}" class="form-control">
			</div>
			<div class="row form-group">
				<label for="mobile">手机</label>
				<input type="text" class="form-control" th:field="*{mobile}" maxlength="11">
			</div>
			<div class="row form-group">
				<label for="email">电子邮件</label>
				<input type="email" class="form-control" th:field="*{email}" maxlength="100">
			</div>
			<div class="row form-group">
			<label for="validstate">审核</label>
			<select  th:field="*{validstate}" class="custom-select d-block w-100" required>
              <option th:each="a:${limits}" th:text="${a}" th:value="${a}"  > </option>
            </select>
			</div>
			<div class="row form-group">
			<label for="role">身份</label>
			<select  th:field="*{role}" class="custom-select d-block w-100" required>
              <option th:each="a:${roles}" th:text="${a}" th:value="${a}"  > </option>
            </select>
			</div>
			
			<div class="row form-group">
				<button type="submit" class="btn btn-primary">保存</button>
			</div>
			</div>
		</form>
	</div>

</body>
</html>